Skip to content

Conversation

@AhmedIsmail02
Copy link
Member

@AhmedIsmail02 AhmedIsmail02 commented Dec 22, 2025

Description

This PR introduces the following:

  • Support for the Memory Protection Unit (MPU) to the ARM Cortex-R82 port. The MPU enhances system security by allowing the definition of memory regions with specific access permissions. The following changes have been made:

    • Added MPU configuration functions in port.c to set up memory regions and their attributes.
    • Updated portASM.S to include assembly routines for MPU and context switching with MPU support.
    • Created mpu_wrappers_v2_asm.c to provide assembly wrappers for MPU operations.
    • Updated portmacro.h to include MPU-related macros and definitions.
    • Modified task.h to include MPU-related task attributes.
    • Updated CMakeLists.txt to include the new MPU source file.
    • Enhanced the README.md with instructions on MPU configuration.
  • Minor code improvements to enhance readability and maintainability of the Cortex-R82 port files. Changes include refactoring variable names and optimising comments without altering functionality.

This PR blocks Arm-Cortex-R82: Add SMP MPU examples PR.

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This commit introduces support for the Memory Protection Unit (MPU)
to the ARM Cortex-R82 port. The MPU enhances system security
by allowing the definition of memory regions with specific access
permissions. The following changes have been made:
- Added MPU configuration functions in `port.c` to set up memory
  regions and their attributes.
- Updated `portASM.S` to include assembly routines for MPU
  and context switching with MPU support.
- Created `mpu_wrappers_v2_asm.c` to provide assembly wrappers for
  MPU operations.
- Updated `portmacro.h` to include MPU-related macros and definitions.
- Modified `task.h` to include MPU-related task attributes.
- Updated `CMakeLists.txt` to include the new MPU source file.
- Enhanced the `README.md` with instructions on MPU configuration.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
This commit includes minor code improvements to enhance readability
and maintainability of the Cortex-R82 port files. Changes include
refactoring variable names, optimizing comments, and improving code
structure without altering functionality.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant